home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / grafica / deluxe mandelbrot / scripts / createstartup.rexx next >
OS/2 REXX Batch file  |  1997-01-04  |  2KB  |  83 lines

  1. /* This is a script for Deluxe Mandelbrot © THOR.
  2.    It generates the startup-picture and saves it to the
  3.    program directory.
  4.    You should call this macro to build the startup-picture.
  5.    Updated for versions 1.10 and above
  6. */
  7.    
  8.  
  9. lockgui
  10.  
  11. /* clear all */
  12.  
  13. new
  14.  
  15. /* The line feed character */
  16. lf=x2c('0a')
  17.  
  18. /* Notify the user about the purpose of this macro.
  19.    Note the double quotes allow spaces in the arguments */
  20.    
  21. requestnotify '"This macro generates' || lf || 'the startup picture."'
  22.  
  23. requestnotify '"Please select first' || lf || 'your prefered monitor."'
  24.  
  25. /* Let the user choice her prefered screenmode, default is EHB noninterlaced.
  26.    Note that the name of the variable to put the settings into must be
  27.    given in QUOTES... */
  28.  
  29. requestscreen 320 256 6 128+4 'monitor'
  30.  
  31.  
  32. /* The stem variable monitor contains now the settings.
  33.    Now adjust the screen, if user says O.K. */
  34.    
  35. if monitor.width>0 then do
  36.         
  37.  monitor monitor.width monitor.height monitor.depth monitor.modeid
  38.  
  39. /* Disable the requesters */
  40.  
  41.  offverify
  42.  
  43. /* The monitor is open now. Reset the parameters to defaults :
  44.    first get the defaults */
  45.  
  46.  rangedefaults mandelbrot 'defaults'
  47.  
  48. /* and set them */
  49.  setscreenparms 'defaults'
  50.  
  51. /* get processor and set to default */
  52.  
  53.  suggestprocessor 'proc'
  54.  setprocessor proc
  55.  
  56. /* remove the dragbar */
  57.  menuselected prefs dragbar 'drag'
  58.  if drag=TRUE then
  59.   menu prefs dragbar
  60.   
  61. /* now we're ready to calculate */
  62.  
  63.  menu project start
  64.  
  65. /* and wait for completion */
  66.  
  67.  waitcomplete
  68.  
  69. /* and now save this */
  70.  
  71. /* we must enable verification now, or all requesters are disabled */
  72.  
  73.  onverify
  74.  saveas 'Startup.mdl'
  75.  
  76. /* we're done... */
  77.  
  78.  requestnotify '"Generation finished."'
  79.  
  80. end
  81. unlockgui
  82.  
  83.